<?php $view->extend('::frontend/admin/layout.html.php') ?>
<?php $view['slots']->start('content'); ?>
<!-- ================================================================================================================== -->
<div id="center-column">
 <div>
 	<h2 style="text-align: center;">Chỉnh sửa sản phẩm</h2>
 </div>
<div class="table" style="text-align: left;">
	<form method="post" action="<?php echo $view->escape($view['router']->generate('frontendfront_admin_Product_add')); ?>" enctype="multipart/form-data" >
	<table  border="0" cellpadding="5px" cellspacing="0" width="100%">
			<tr>
				<td width="12%">Tiêu đề : </td>
	            <td>
	            	<input type="text" name="txtTitle" id="txtTitle" value="<?php echo (isset($aData['txtTitle']) ?  $aData['txtTitle'] : $oNew[0]['title'])?>" style="width: 90%">
				 	<?php if(isset($aErr['txtTitle'])) { ?>
				 	<br /><br/>
				 	<span style="color: red;"><?php echo $aMessageMap[$aErr['txtTitle']]?> </span>		
				 	<?php } ?>
	            </td>
	        </tr>
	        <tr>
				<td width="12%">Mô tả : </td>
	            <td>
	            	<textarea  id="txtDescription" name="txtDescription" cols="140" rows="10"><?php echo (isset($aData['txtDescription']) ?  $aData['txtDescription'] : $oNew[0]['description'])?></textarea>
				 	<?php if(isset($aErr['txtDescription'])) { ?>
				 	<br /><br/>
				 	<span style="color: red;"><?php echo $aMessageMap[$aErr['txtDescription']]?> </span>		
				 	<?php } ?>
	            </td>
	        </tr>
	        <tr>
				<td width="12%">Nội dung :</td>
	            <td>
	            	<textarea  id="editor1" name="editor1" cols="100" rows="10"><?php echo (isset($aData['editor1']) ?  $aData['editor1'] : $oNew[0]['content'])?></textarea>
				    <script>
		                CKEDITOR.replace( 'editor1' );
		            </script>
					
				 	<?php if(isset($aErr['editor1'])) { ?>
				 	<br /><br/>
				 	<span style="color: red;"><?php echo $aMessageMap[$aErr['editor1']]?> </span>		
				 	<?php } ?>
	            </td>
	        </tr>
	        <tr>
				<td width="12%">Image : </td>
	            <td>
	            	<!-- <img alt="" src="<?php echo $view->escape($view['assets']->getUrl('uploads/product/'.$oNew[0]['imgpath']));?>">  -->
	            	<img src="<?php echo $this['imagine']->filter('/uploads/product/20130623030904.jpeg', 'little_nice_thumbnail') ?>" />
	            	
	            	<br />
	            	<input type="file" name="fImge" value="fImage">	
				 	<?php if(isset($aErr['fImge'])) { ?>
				 	<br /><br/>
				 	<span style="color: red;"><?php echo $aMessageMap[$aErr['fImge']]?> </span>		
				 	<?php } ?>
	            </td>
	        </tr>
	</table>
	<div style="text-align: center;padding-bottom: 20px"><input type="submit" name="btSubmmit" id="btSubmmit" value="Thêm mới" style="font-size: 18px"></div>   
	</form>        
</div>
</div>

<!-- ================================================================================================================== -->
<?php $view['slots']->stop() ?>